/*
 * An XML document type.
 * Localname: GetLinksResponse
 * Namespace: http://www.hpsearch.org/schemas/2006/05/BSA
 * Java type: cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument
 *
 * Automatically generated - do not modify.
 */
package cgl.narada.mgmt.schemas.bsa.impl;
/**
 * A document containing one GetLinksResponse(@http://www.hpsearch.org/schemas/2006/05/BSA) element.
 *
 * This is a complex type.
 */
public class GetLinksResponseDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument
{
    
    public GetLinksResponseDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName GETLINKSRESPONSE$0 = 
        new javax.xml.namespace.QName("http://www.hpsearch.org/schemas/2006/05/BSA", "GetLinksResponse");
    
    
    /**
     * Gets the "GetLinksResponse" element
     */
    public cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse getGetLinksResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse target = null;
            target = (cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse)get_store().find_element_user(GETLINKSRESPONSE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "GetLinksResponse" element
     */
    public void setGetLinksResponse(cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse getLinksResponse)
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse target = null;
            target = (cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse)get_store().find_element_user(GETLINKSRESPONSE$0, 0);
            if (target == null)
            {
                target = (cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse)get_store().add_element_user(GETLINKSRESPONSE$0);
            }
            target.set(getLinksResponse);
        }
    }
    
    /**
     * Appends and returns a new empty "GetLinksResponse" element
     */
    public cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse addNewGetLinksResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse target = null;
            target = (cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse)get_store().add_element_user(GETLINKSRESPONSE$0);
            return target;
        }
    }
    /**
     * An XML GetLinksResponse(@http://www.hpsearch.org/schemas/2006/05/BSA).
     *
     * This is a complex type.
     */
    public static class GetLinksResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements cgl.narada.mgmt.schemas.bsa.GetLinksResponseDocument.GetLinksResponse
    {
        
        public GetLinksResponseImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName LINKID$0 = 
            new javax.xml.namespace.QName("", "linkID");
        
        
        /**
         * Gets array of all "linkID" elements
         */
        public java.lang.String[] getLinkIDArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List targetList = new java.util.ArrayList();
                get_store().find_all_element_users(LINKID$0, targetList);
                java.lang.String[] result = new java.lang.String[targetList.size()];
                for (int i = 0, len = targetList.size() ; i < len ; i++)
                    result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
                return result;
            }
        }
        
        /**
         * Gets ith "linkID" element
         */
        public java.lang.String getLinkIDArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LINKID$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) array of all "linkID" elements
         */
        public org.apache.xmlbeans.XmlString[] xgetLinkIDArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List targetList = new java.util.ArrayList();
                get_store().find_all_element_users(LINKID$0, targetList);
                org.apache.xmlbeans.XmlString[] result = new org.apache.xmlbeans.XmlString[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets (as xml) ith "linkID" element
         */
        public org.apache.xmlbeans.XmlString xgetLinkIDArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(LINKID$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return (org.apache.xmlbeans.XmlString)target;
            }
        }
        
        /**
         * Returns number of "linkID" element
         */
        public int sizeOfLinkIDArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(LINKID$0);
            }
        }
        
        /**
         * Sets array of all "linkID" element
         */
        public void setLinkIDArray(java.lang.String[] linkIDArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(linkIDArray, LINKID$0);
            }
        }
        
        /**
         * Sets ith "linkID" element
         */
        public void setLinkIDArray(int i, java.lang.String linkID)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LINKID$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.setStringValue(linkID);
            }
        }
        
        /**
         * Sets (as xml) array of all "linkID" element
         */
        public void xsetLinkIDArray(org.apache.xmlbeans.XmlString[]linkIDArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(linkIDArray, LINKID$0);
            }
        }
        
        /**
         * Sets (as xml) ith "linkID" element
         */
        public void xsetLinkIDArray(int i, org.apache.xmlbeans.XmlString linkID)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(LINKID$0, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(linkID);
            }
        }
        
        /**
         * Inserts the value as the ith "linkID" element
         */
        public void insertLinkID(int i, java.lang.String linkID)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = 
                    (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(LINKID$0, i);
                target.setStringValue(linkID);
            }
        }
        
        /**
         * Appends the value as the last "linkID" element
         */
        public void addLinkID(java.lang.String linkID)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(LINKID$0);
                target.setStringValue(linkID);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "linkID" element
         */
        public org.apache.xmlbeans.XmlString insertNewLinkID(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().insert_element_user(LINKID$0, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "linkID" element
         */
        public org.apache.xmlbeans.XmlString addNewLinkID()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(LINKID$0);
                return target;
            }
        }
        
        /**
         * Removes the ith "linkID" element
         */
        public void removeLinkID(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(LINKID$0, i);
            }
        }
    }
}
